﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ServiceModel;
using Kobets.Automation.Chimera.Common.Models;
using Environment = Kobets.Automation.Chimera.Common.Models.Environment;

namespace Kobets.Automation.Chimera.Common.Contracts
{
    [ServiceContract]
    public interface IControllerContract
    {
        [OperationContract]
        void Restart();

        [OperationContract]
        Enums.ControllerStatus GetStatus();

        [OperationContract]
        string GetName();

        [OperationContract]
        Collection<Agent> GetAssociatedAgents();

        [OperationContract]
        void RegisterAgent(Agent agent);

        [OperationContract]
        void UnregisterAgent(Agent agent);

        [OperationContract]
        void RefreshAgentsStatus(Agent[] agents = null);

        [OperationContract]
        void ExecuteWork(Recipe recipe, Environment environment);
        
        [OperationContract]
        void ExecuteById(Guid recipeId, Guid environmentid);

        [OperationContract]
        void StopExecution(Guid environmentid);
    }
}
